package com.chhuang.ewcrm.application;

import com.chhuang.ewcrm.api.AppRequest;
import com.chhuang.ewcrm.config.PropertiesUtil;
import com.chhuang.ewcrm.cons.Constants;
import com.chhuang.ewcrm.utils.MyPath;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyCodeCombination;
import javafx.scene.input.KeyCombination;
import javafx.stage.Stage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;

/**
 * 应用程序启动登录场景
 * @author chhuang
 * @create 2020-09-29-9:37
 */
public class LoginApp extends Application {
    private final Logger logger = LoggerFactory.getLogger(LoginApp.class);

    @Override
    public void start(Stage stage) {
        try {
            Parent login = FXMLLoader.load(getClass().getResource("/fxml/login.fxml"));//加载第一个页面

            stage.setTitle("称重过磅系统登录");//设置标题
            Scene scene = new Scene(login);
            scene.getStylesheets().add("org/kordamp/bootstrapfx/bootstrapfx.css");

            stage.getIcons().add(new Image("/img/guangfuu.png"));
            stage.setScene(scene);//设置场景
            stage.setResizable(false);//不能改变窗口大小
            stage.show();//显示
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
